package com.aeon.jface.treeTable.ui;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.dialogs.PatternFilter;

public class MTreeFilter1 extends PatternFilter {

	
	@Override
	protected boolean isLeafMatch(Viewer viewer, Object element) {
		String labelText = null;
		if (element instanceof Node) {
			Node node = (Node) element;
			labelText = node.getmName();
			if (node.getmParent()!=null &&wordMatches(node.getmParent().getmName())) {
				return true;
			}
		}
		return wordMatches(labelText);

	}

}
